<form action="" class="layui-form">
	<div class="layui-card-header">
		添加分会等级积分	
	</div>
    <div class="layui-col-xs12">
    	<div class="layui-card-body">
	      	<table class="layui-table" lay-size="lg">
	      		<tbody>
	      			<tr>
	      				<th>当前分会ID：</th>
	      				<th class="nowId"></th>
	      			</tr>
	      			<tr>
	      				<th>当前分会名称：</th>
	      				<th class="nowName"></th>
	      			</tr>
	      			<tr>
	      				<th>当前积分：</th>
	      				<th class="nowScore"></th>
	      			</tr>
	      			<tr>
	      				<th>变更积分：</th>
	      				<th>
	      					
	      						 
	      					
	      					<table  class="layui-table" lay-skin="nob">
	      						<tbody>
	      							<tr>
	      								<td>
	      									<select name="changeMoney" class="mon" >
											  <option value="1">增加</option>
											  <option value="0">减少</option>
											</select>   
	      								</td>
	      								<td><input type="text" name="money" required class="layui-input money" ><span class="moneyWarn">*</span></td>
	      								
	      							</tr>
	      						</tbody>
	      					</table>
	      					
	      				</th>
	      			</tr>
	      			<tr>
	      				<th>备注：</th>
	      				<th><textarea name="else" placeholder="请输入" class="layui-textarea memo" style="resize:none;"></textarea></th>
	      			</tr>
	      		</tbody>
	      	</table>
	      	<div class="userInfoBtns">
	      		<button type="button" class="confirm layui-btn layui-btn-primary">确定</button>
	      		<button type="button" class="back layui-btn">返回列表</button>
	      	</div>
	      	</div>
     	</div>
      	</form>
      	

<script>
	let back = document.querySelector(".back");
	let nowId = document.querySelector(".nowId");
	let nowName = document.querySelector(".nowName");
	let nowScore = document.querySelector(".nowScore");
	let confirm = document.querySelector(".confirm");
	let memo = document.querySelector(".memo");
	let mon = document.querySelector(".mon");
	let money = document.querySelector(".money");
	
	layui.config({
    base: '/src/js/'
  }).use(['jquery', 'mockjs', 'table', 'sidebar', 'form' , 'route'], function () {
    var $ = layui.jquery,
      layer = layui.layer,
      table = layui.table,
      sidebar = layui.sidebar,
      route = layui.route,
      params = route.params(),
      form = layui.form;
      
      _obj={
		  "Guid": "",
		  "OperateType": "",
		  "CurrentScore": "",
		  "OperateScore": "",
		  "LastOperateScore": "",
		  "Date": getNowFormatDate(),
		  "Memo": "",
		  "MemLoginId": "",
		  "CreateUser": localStorage.getItem("user"),
		  "CreateTime": "",
		  "CircleGuid": params.id,
		  "IsDeleted": ""
      }
      
      
      renderForm();
      
      
      function renderForm(){
		  layui.use('form', function(){
		   var form = layui.form;//高版本建议把括号去掉，有的低版本，需要加()
		   form.render();
		  });
		}
      
      back.addEventListener("click",function(){
      	console.log(params.id)
      	window.location.href="#/layui/changeFenhuiInte?id="+params.id;
      })
      
      nowId.innerText = params.id;
      
      DBHelper.Get("Admin_Xn_RankScoreModifyLog?id="+params.id,function(data){
      	console.log(data)
      },function(data){
      	console.log(data)
      })
      
      
    })
  	
  	confirm.addEventListener("click",function(){
  		_obj.CreateTime=getNowFormatDate();
  		_obj.OperateType = $(".mon").val();
  		_obj.OperateScore = money.value;
  		console.log(_obj)
  	})
  
  
	
	
</script>


<style scoped>
  	.title{
  		margin-left: 30px;
  		margin-top: 30px;
  	}
  	.save-warp{
  		width: 100%;
  		text-align: center;
  		margin-top: 20px;
  	}
  	.save-warp button{
  		display: inline-block;
  		width: 160px;
  	}
  	.changeLev-top{
  		display: flex;
  		width: 100%;
  		justify-content: space-between;
  		margin-top: 10px;
  		margin-bottom: 10px;
  	}
  	.changeSe{
  		width: 200px;
  		height: 50px;
  	}
  	.changeLevTable{
  		margin-top: 10px;
  	}
  	.moneyWarn{
  		color: red;
  	}
  	.money{
  		display: inline-block;
  		width: 200px;
  		margin-right: 20px;
  	}
  	.userInfo{
  		margin-top: 20px;
  	}
  	.userInfoBtns{
  		display: flex;
  		justify-content: center;
  	}
  	.userInfoBtns button{
  		width: 200px;
  		margin-top: 20px;
  		margin-bottom: 20px;
  	}
	
	
	
	.spt {
		line-height: 35px;
	}
	.clearfix::after {
		content: "";
		clear: both;
		width: 100%;
		height: 0;
		display: block;
	}
	
	.layui-date>input {
		width: 100px;
		margin: 0 10px;
	}
	
	.fl {
		float: left;
	}
      	
</style>